<?php
namespace Admin\Model;

class ResourceModel extends CommonModel{
    
    //根据类别获取资源一维数组
    public function getResByType($type){
        $list = $this->where(array('type'=>'cookbook'))->order('id asc')->select();
        $row = array();
        foreach($list as $v){
            $row[$v['id']] = $v['name'];
        }
        return $row;
    }
    
}